package com.crscd.springbootmapper4.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created with IntelliJ IDEA.
 * Description:
 *
 * @author lzy
 * @create 2019-05-31 下午12:48
 */
@Slf4j
@RestController
public class TestController {

    @RequestMapping("/hello")
    public String sayHello(@RequestParam(name = "name", defaultValue = "test") String name) {
        log.info("call method [{}], param:[{}]", "sayHello", name);
        return String.format("hello %s", name);
    }
}
